/*
Kakine
ActionScript Framework
Copyright © 2011, PUNY, LLC.

This file is part of KAKINE.

KAKINE is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

KAKINE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with KAKINE.  If not, see <http://www.gnu.org/licenses/>.
*/ 
package com.puny.ball.views
{
	import com.puny.mvc.helpers.FrameHelper;
	import com.puny.mvc.views.View;
	
	import flash.filters.GlowFilter;

	public class BallView extends View
	{
		private var _radius:Number = 5;
		public function BallView(src:Object=null)
		{
			super(src);
		}
		
		public function get radius():Number {
			return _radius;
		}
		
		public function set radius(value:Number):void {
			value = _radius;
			drawShape();
		}
		
		private function drawShape():void {
			graphics.clear();
			graphics.beginFill(0x000000,.4);
			graphics.drawCircle(1,1,_radius);
			graphics.endFill();
			graphics.beginFill(0xEEEEEE);
			graphics.drawCircle(0,0,_radius);
			graphics.endFill();
			graphics.beginFill(0xFFFFFF);
			graphics.drawCircle(-1,-1,_radius-2);
			graphics.endFill();
		}
		
		override protected function setup():void {
			visible = false;
			drawShape();
		}
		
		
	}
}